package dissertation.extensions.beans.message;

import com.intellij.psi.PsiDirectory;
import dissertation.common.constants.Constants;
import dissertation.extensions.beans.base.control.NewEJBClass;

import java.util.Arrays;
import java.util.List;

import static dissertation.common.constants.Constants.EJB_PACKAGE;

public class NewEJBMessageDrivenClass extends NewEJBClass {
    public NewEJBMessageDrivenClass() {
        super(EJB_PACKAGE, "MessageDriven", "MDB", "EJB", "Create new Singleton Bean");
    }

    @Override
    protected String getErrorTitle() {
        return "Failed to create Message-Driven Bean";
    }

    @Override
    protected String getCommandName() {
        return "Create Message-Driven Bean";
    }

    @Override
    protected String getActionName(PsiDirectory psiDirectory, String s) {
        return "Message-Driven Bean Creation";
    }

    @Override
    public List<String> getSupportedEJBVersions() {
        return Arrays.asList(Constants.EJB_VERSION_3_0, Constants.EJB_VERSION_3_1);
    }
}
